package com.queen.restaurant.domain;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;

import org.hibernate.annotations.GenericGenerator;

@Entity
@Table(name="t_course")
public class Course implements Serializable {
	//主键uuid
	@Id
	@Column(name="id",nullable=false,length=32)
	@GenericGenerator(name="hibernate-uuid",strategy="uuid")
	@GeneratedValue(generator="hibernate-uuid")
	private String id;

	//	@ManyToOne(fetch=FetchType.EAGER,cascade={CascadeType.PERSIST,CascadeType.MERGE})
//	@JoinColumn(name="courseTypeId", nullable=false)
//	private CourseType courseType;
	@Column
	private String courseName;
	@Column
	private double realPrice;
	@Column
	private double queenPrice;
	@Column
	private int times;
	@Column
	private String createTime;
	@Column
	private String introduce;
	@Column
	private String picPath;
	@Column
	private boolean canOrder;
	@Column
	private double commentLevel;
//	private List<OrderItem> orderItems = new ArrayList<OrderItem>();

	public Course() {
	}

	public Course( String courseName, double realPrice,
			double queenPrice, int times, String createTiem, String introduce,
			String picPath, boolean canOrder) {
//		CourseType courseType,
//		this.courseType = courseType;
		this.courseName = courseName;
		this.realPrice = realPrice;
		this.queenPrice = queenPrice;
		this.times = times;
		this.createTime = createTiem;
		this.introduce = introduce;
		this.picPath = picPath;
		this.canOrder = canOrder;
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}
//
//	public CourseType getCourseType() {
//		return courseType;
//	}
//
//	public void setCourseType(CourseType courseType) {
//		this.courseType = courseType;
//	}

	public String getCourseName() {
		return courseName;
	}

	public void setCourseName(String courseName) {
		this.courseName = courseName;
	}

	public double getRealPrice() {
		return realPrice;
	}

	public void setRealPrice(double realPrice) {
		this.realPrice = realPrice;
	}

	public double getQueenPrice() {
		return queenPrice;
	}

	public void setQueenPrice(double queenPrice) {
		this.queenPrice = queenPrice;
	}

	public int getTimes() {
		return times;
	}

	public void setTimes(int times) {
		this.times = times;
	}

	public String getCreateTime() {
		return createTime;
	}

	public void setCreateTime(String createTime) {
		this.createTime = createTime;
	}

	public String getIntroduce() {
		return introduce;
	}

	public void setIntroduce(String introduce) {
		this.introduce = introduce;
	}

	public String getPicPath() {
		return picPath;
	}

	public void setPicPath(String picPath) {
		this.picPath = picPath;
	}

	public boolean getCanOrder() {
		return canOrder;
	}

	public void setCanOrder(boolean canOrder) {
		this.canOrder = canOrder;
	}

	public double getCommentLevel() {
		return commentLevel;
	}

	public void setCommentLevel(double commentLevel) {
		this.commentLevel = commentLevel;
	}

//	public List<OrderItem> getOrderItems() {
//		return orderItems;
//	}
//
//	public void setOrderItems(List<OrderItem> orderItems) {
//		this.orderItems = orderItems;
//	}
	
}
